Skip to content

Conversation

@ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Jan 10, 2020

In #10028 we added logic to reset control flow analysis based types following discriminant checks. This logic was really only needed in scenarios involving loops, and it now appears unnecessary, likely because of subsequent fixes in loop analysis that addressed the root issue.

Having thought about it some more, I can't come up with any examples that merit the code added in ade89a6, and removing it has no longer has adverse effects.

Fixes #36028.

@ahejlsberg
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this
@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2020

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 766cb83. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2020

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at 766cb83. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 10, 2020

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 766cb83. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@ahejlsberg
Copy link
Member Author

Tests look clean. All failures are preexisting conditions.

@ahejlsberg ahejlsberg merged commit 94271aa into master Jan 10, 2020
Kingwl pushed a commit to Kingwl/TypeScript that referenced this pull request Mar 4, 2020
* Remove unnecessary containsMatchingReferenceDiscriminant logic

* Accept new baselines
@jakebailey jakebailey deleted the fix36028 branch November 7, 2022 17:34
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strict null check flow analysis broken by unrelated branch logic

4 participants